package com.jiamao.goplay.view;

import android.content.Context;
import android.util.Log;
import android.view.View;

import com.jiamao.goplay.R;
import com.kingja.loadsir.callback.Callback;

/**
 * Description:TODO
 * Create Time:2017/9/4 10:22
 * Author:KingJA
 * Email:kingjavip@gmail.com
 */

public class EmptyCallback extends Callback {

    @Override
    protected int onCreateView() {
        return R.layout.comm_empty;
    }

    @Override
    protected boolean onReloadEvent(Context context, View view) {
        //Toast.makeText(context.getApplicationContext(),"Connecting to the network again!", Toast.LENGTH_SHORT).show();
        return false;
    }

    private Context context;
    View view;

    //将Callback添加到当前视图时的回调，View为当前Callback的布局View
    @Override
    public void onAttach(Context context, View view) {
        super.onAttach(context, view);
        this.context = context;
        this.view = view;
        Log.d("HTML","onAttach");
    }


    //是否在显示Callback视图的时候显示原始图(SuccessView)，返回true显示，false隐藏
    @Override
    public boolean getSuccessVisible() {
        return true;
    }



}
